# -*- coding = utf-8 -*-
# @Time: 2023-09-30 15:03
# @Author: DavidXie03
# @File: my_tags.py
# @Software: PyCharm

from django import template

register = template.Library()   # register的名字是固定的,不可改变

@register.filter(is_safe=False)
def label_class(value, cls):
    return value.label_tag(attrs={'class': cls})